﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections.Specialized;

using Common.Logging;
using Common.Logging.Simple;

namespace Utility
{
    public class LogFactory
    {
        /// <summary>
        /// Create the log write to file
        /// </summary>
        /// <returns></returns>
        public static ILog CreateFileLog()
        {
            return LogManager.GetLogger("ServiceLog");
        }

        /// <summary>
        /// Create the log wirte to output window
        /// </summary>
        /// <returns></returns>
        public static ILog CrateDebugLog()
        {
            NameValueCollection properties = new NameValueCollection();
            properties.Add("showDateTime", "true");
            LogManager.Adapter = new ConsoleOutLoggerFactoryAdapter(properties);
            return LogManager.GetLogger("");
        }
    }
}
